import MyTable from '@/components/MyTable';
import { getResult } from '@/services/sys/attribute';
import { findByWalletPageLogList } from '@/services/sys/log';
import React from 'react';

const columns = [
  {
    title: '编号',
    key: 'id',
    dataIndex: 'id',
    search: false,
  },
  {
    title: '用户姓名',
    key: 'name',
    dataIndex: 'name',
    search: true,
  },
  {
    title: '动作',
    key: 'state',
    dataIndex: 'state',
    search: true,
    valueType: 'select',
    valueEnum: await getResult('usersblancewithdrawaltype', 0),
    //usersblancewithdrawaltype
  },
  {
    title: '操作帐户',
    key: 'type',
    dataIndex: 'type',
    valueType: 'select',
    valueEnum: await getResult('userswithdrawaltype', 0),
    search: true,
  },
  {
    title: '操作金额',
    key: 'price',
    dataIndex: 'price',
    valueType: 'money',
    search: false,
  },
  {
    title: '当前余额',
    key: 'balance',
    dataIndex: 'balance',
    valueType: 'money',
    search: false,
  },
  {
    title: '详细说明',
    key: 'remark',
    dataIndex: 'remark',
    search: false,
  },
  {
    title: '申请时间',
    key: 'create_date',
    dataIndex: 'create_date',
    valueType: 'dateTime',
    search: false,
  },
  {
    title: '下单人',
    key: 'orderUserName',
    dataIndex: 'orderUserName',
    search: false,
  },
  {
    title: '操作员',
    key: 'operatorName',
    dataIndex: 'operatorName',
    search: false,
  },
];
const Log: React.FC = (props) => {
  return (
    <MyTable
      search={true}
      request={findByWalletPageLogList}
      columns={columns}
    />
  );
};
export default Log;
